package com.ywk.wsClient;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.Scanner;

/**
 * @Author zbh
 * @Date 2023/5/4
 */
public class WSClientMain {
    public static void main(String[] args) throws URISyntaxException {
        WSClient wsClient = new WSClient(new URI("ws://127.0.0.1:8888"));
        wsClient.connect();
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            if ("exit".equals(s)){
                break;
            }
            wsClient.send(s);
        }
    }
}
